Standard Time to Military Time
You shouldn't care about whether it's 17:00 or 5:00 PM. How SQL Server ends up storing the time is irrelevant (formatting is for the presentation tier) - you should be focusing on converting the data to the right time value and storing it as the right data type (in this case probably datetime, but in modern versions of SQL Server, just time).

DECLARE @s char(5) = '0500p', @x datetime;

-- first convert it to a datetime-friendly format
SELECT @x = STUFF(@s,3,0,':') + 'm';

-- now some options for output:
SELECT @x, CONVERT(CHAR(5), @x, 108);


Results:

1900-01-01 17:00:00.000        17:00


Be sure that you consider formatting the value as a string only in the presentation tier. It's not really SQL Server's job to handle formatting for display, and your client tools are better suited for that translation anyway.