Although a few stodgy editors and style guides still recommend the 1990s-style on-line (with a hyphen) for the computing-related adjective, the trajectory of the language favors online. The latter is now considered acceptable by most dictionaries and English usage guides, and most major publications have changed with the times. Perhaps more important, online is far more common in popular usage.
Of course, on line is two words when it functions as an adjective phrase with on modifying the noun line (e.g., we are on line at the store).
Most major publications have dropped the hyphen from online—for example:
Online or off, a ferocious will and a forced optimism are required to remain in the game. [NY Times]
Answer: when it’s an online-only TV show. [Telegraph]
Hughes owns one satellite and is slated to launch another one next year which will allow it to provide faster online services. [Wall Street Journal]
But it’s still possible to find examples of the hyphenated on-line:
“A Dying Wish” was published on-line by Forbes magazine the day she died. [Boston Globe]
New on-line tool shows where to go for help with health insurance [St. Louis Post-Dispatch]
But such examples are becoming more infrequent, and even the Boston Globe and the St. Louis Post-Dispatch already use online most of the time.