There are any number of reasons that you might need to transfer the logins between instances of SQL Server. One of the most common times this is necessary is when performing a SQL Server consolidation or migration. The good news is that its a fairly easy task to perform for several generations of SQL Server.
Most of the older SQL Server versions required you to create a data transformation services (DTS) job to transfer the logins while the newer versions all you to execute some SQL scripts. Either way Microsoft has produced two knowledge base articles on both procedures: