The short answer is eight to ten weeks before your last frost - but why do we sow at this time?
Sowing tomato seeds at the right time can help avoid a number of problems that are caused by low light levels.
Leggy tomato plants
Sowing too early means that plants struggle through shorter days, and in their search for more light, become leggy.
Leggy tomato plants with thin stems will produce fewer tomatoes, so it's important to grow healthy stocky seedlings and young plants if you want a good crop.
Fewer flower buds
The other issue with low light levels is the amount of flower buds that are encouraged by light. Less light means fewer flowers and eventually tomatoes.
It is true that a plant sown a little later in the spring can catch up and do better than a plant sown earlier that has had to struggle through short days and cooler temperatures.
Of course, with grow lights and correct temperatures, tomatoes can be sown and grown any time of the year!
More information on when to sow and how to sow tomato seeds.