If you’re standing “on line,” you’re probably from New York. However, “on line” isn’t exclusively a New York thing. Grammarphobia notes that there are tiny pockets throughout the U.S. that use the colloquialism. North Easterners especially can be heard dropping the idiom.
However, “on line” is not common. An internet survey displayed how only 5.49 percent of participants use “on line” to indicate they’re queuing up for something. Still make sure to say you’re “next on line” while you’re waiting for a sandwich in a West Village deli. It'll appease the locals.
Due to its nationwide usage, “in line” is popularly viewed as being grammatically correct: There’s no physical line you’re actually standing on, after all. The Atlantic points out, however, that it really depends on the speaker’s preferences. Either way gets the point across.