Pass the password back
Indentation: 


From the Coding Style recommendation, I am using 2-space indentation, which works for me. The guide suggests that you should avoid tabs as well:


  Do not use TAB characters (ASCII HT, 0x09). There is no standard default TAB setting, so the look of source files using TAB characters will depend on client settings. This may result in a chaotic view of source files. Align by space characters (also see Indentation). 

However, the same coding style says that you should not use space around operators, symbols...:


  Don't use spaces around operators, colons, parentheses etc. e.g. write p:=p+i; instead of p := p + i ;.


Since I am not using colored symbols, I've chosen to follow the "Guideline of the Lazarus 1.4.0 color preview":



As you can see, the color preview of the IDE uses spaces around symbols (:=, +, -, *, and so on). Whoever wrote this preview is a point out of curve like me.


Code:


Repeat is a posttest loop, and your code needs to run at least once, so why not a repeat..until loop.. In another words, you know the first key will always be different from #13, you hardcoded it. You can save a begin..end block, as well.
You do not need begin..end blocks for one line statements inside case conditions.


Structure:

For code reuse and exploration I would find it more practical to create a function that would only wait for and then return the password:

program HandlePassword;

uses
  crt;

function WaitForPassword: string;
var
  key: char;
  len: integer;
begin
  Result := Chr(0);
  key := Chr(0);
  repeat
    key := ReadKey;
    len := Length(Result);
    case Ord(key) of
      8: if len &gt; 0 then Delete(Result, len, 1);
      else Result := Result + key;
    end;
  until key = Chr(13);
end;

begin
  ClrScr; // clear screen
  Write('Write the password:');
  WriteLn(WaitForPassword);
  ReadLn; // pauses the code
end.