Will it matter if i use 215/75r15 on my ford ranger?

The sticker in the door calls for 265/75r15 and all the specs I can find says 215/7515 is the tire to use

Added (1). is the 215 alright to use?

The 215s are about 2" narrower and about 3" shorter than what the sticker calls for. So that means if you're going 70mph, the speedometer will actually read about 85mph.

The better question is, what size is currently on it? I can't say I've ever seen a Ranger with a 31" tire stock.

The differences between the two sizes is the width of the tread and a slightly lower sidewall (75% of 265 versus 75% of 215) so there shouldn't be any issues other than the speedometer will not indicate correct speed. Unless you're intending to do a lot of hauling the narrower tires won't be an issue as far as weight goes. They're cabable of handling the weight of the truck.

Will it matter?

Definitely. The load index for a 215/75 tire is much lower and could be unsafe ( unable to handle the weight of the vehicle ). The much lower overall diameter of the 215 tires would also throw off your speedo ( it would read higher than actual speed ).