と is a conditional particle, corresponding rather closely to English "if".
"Whenever" is a bit too strong, and "when" is too weak for its meaning.
It is a simple conditional, meaning "if A, then B follows" without the emphasis of "Whenever".
私は友だちと話すときうれしくなる -> When I talk with my friend, I feel happy.
私は友だちと話すとうれしくなる -> If I talk with my friend, I feel happy.
私は友だちと話すといつもうれしくなる -> If I talk with my friend, I always feel happy.