WASHINGTON — In a significant victory for Sun Microsystems Inc. in its long-running battle with Microsoft Corp., a federal judge yesterday ordered Microsoft to take steps to give its rival a better chance of competing in the emerging market for personal computer platform software.