They would be considered rent in the year you collected it, if you intend to keep the deposit.
If
you are holding the deposit until they move out (and intend to return
less damages), it is not included in income for the year. Instead, any
amounts you kept for repairs or damages would be included in the year
that you refunded the difference.
https://www.irs.gov/publications/p527/ch01.html