You need Roman numerals when writing formulas for ionic compounds when the metal ions can have more than one oxidation number.
The most important metals in this group are those in Groups 4 to 11, plus mercury, tin, thallium, lead, and bismuth.
The method of using Roman numerals is called the Stock System.
You use Roman numerals in parentheses to indicate the oxidation number of the metal ion.
For example, iron chloride would be an ambiguous name for the compound
Note: there are no spaces between the name of the metal and the opening parenthesis.
Often, you must use the anion (negative ion) to determine the oxidation number of the positive ion.
You do not use the Stock system if the metal has only one allowed oxidation number.
Here is a listing of the most common oxidation numbers.
This video gives more discussion of how to use the stock naming system.