Different time phrases use different prepositions.

in = years; months; seasons; parts of the day (the morning, afternoon etc)
on = days; dates; one-day holidays
at = times of day; longer holidays

Years

years use ‘in’

I moved to Vienna in 1999.
He bought that car in 2003.

Months

months use ‘in’

My birthday is in July.
They are going on holiday in May.

Seasons

seasons use ‘in’

I’ll go home in the summer.
It is a good idea to visit this country in winter.

seasons also often use ‘during’ (‘during’ means ‘in this time’)

I’ll go home during the summer.
It is a good idea to visit this country during winter.

Days

days use ‘on’

We will have a meeting on Tuesday.
They met on Valentine’s Day.

Dates

dates use ‘on’

She was born on February 29th.
They will come back on the 15th.

Holidays

One day holidays use ‘on’.
Longer holidays use ‘at’.

I will see you on Christmas Day.
I’ll be busy at Christmas.

They will be here on New Year’s Eve.
The company will have a holiday at New Year.

Times

times use ‘at’

The show begins at 2.
I woke up at 4.25.

(Note: midday and midnight are times)

Parts of the Day

parts of the day use ‘in’

She is busy in the morning.
We usually watch TV in the evening.

Note:
night uses ‘at’
the night uses ‘in’
the middle of the night uses ‘in’

There is a lot of noise at night in this city.
There was a lot of noise in the night.
The dog died in the middle of the night.